package com.tvein.sanguo.prompt.view
{
	//flash
	//pureMVC
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.utilities.fabrication.patterns.mediator.FlashMediator;
	//custom
	import com.tvein.sanguo.prompt.common.GameConstants;
	import com.tvein.sanguo.prompt.model.SystemProxy;
	import com.tvein.sanguo.Prompt;
	import com.tvein.sanguo.swc.prompt.PromptShell;
//
	public class PromptMediator extends FlashMediator
	{
		static public const NAME : String = "PromptMediator";
		
		public function PromptMediator(viewComponent:Object)
		{
			super(NAME, viewComponent);
		}
		
		public function get prompt() : Prompt
		{
			return viewComponent as Prompt;
		}
		
		//Custom
		public var promptShell:PromptShell;
		public var systemData:SystemProxy;
		
		override public function onRegister() : void
		{			
			systemData = facade.retrieveProxy(SystemProxy.NAME) as SystemProxy;
			
			prompt.visible = false;
			
			promptShell = new PromptShell(systemData.config);
			
			prompt.addChild(promptShell);
		}
	}
}